{% for upstream in openresty_upstreams %}
    upstream {{ upstream.name }} {
{% if upstream.strategy is defined %}
        {{ upstream.strategy }};
{% endif %}

{% for server in upstream.servers %}
        server {{ server }};
{% endfor %}

{% if upstream.keepalive is defined %}
        keepalive {{ upstream.keepalive }};
{% endif %}
    }

{% endfor %}
